#include <stdio.h>
//使用fgetc和fputc实现文件对文件的读写
int main()
{
    FILE *fr = fopen("文件编程","r");
    FILE *fw = fopen("test.txt","w");
    if(fr == NULL)
    {
        printf("文件打开失败!\n");
        return -1;
    }
    if(fw == NULL)
    {
        printf("文件打开失败!\n");
        return -1;
    }
    char c = 0;
    while((c = getc(fr)) != EOF)
    {
       fputc(c,fw);
    }

    printf("\n");
    fclose(fr);
    fclose(fw);
}